import {IsString,IsInt,MaxLength,MinLength,IsNotEmpty,Length} from 'class-validator'

export class CreateUserDto {
  @IsString({message:'用户名必须是字符串'})
  @IsNotEmpty({message:'用户名不能为空'})
  username:string

  @IsString({message:'密码必须是数值'})
  @IsNotEmpty({message:'密码不能为空'})
  // @MinLength(6)
  // @MaxLength(16)
  @Length(6,12)
  password:string
}